package com.sk.sourcecircle.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.sk.sourcecircle.R;
import com.sk.sourcecircle.entity.HomeTabList;

import java.util.List;

/**
 * Created by sk on 2017/12/12.
 */

public class KindAdapter extends BaseQuickAdapter<HomeTabList.DataBean,BaseViewHolder> {

    public KindAdapter(int layoutResId, @Nullable List<HomeTabList.DataBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, HomeTabList.DataBean item) {
        Glide.with(mContext).load(item.getImg_url()).into((ImageView) helper.getView(R.id.item_bg));
        helper.setText(R.id.item_name,item.getCate_name());
    }
}
